Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / BootloaderOtaQuirksRepository.kt

Displaying Raw • Download

core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/BootloaderOtaQuirksRepository.kt 4651c85361d890ee3b0ac02ea3fc5b185e97033e (4651c853) Text, 1.82 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository

Tff7b72import T7ee787org.meshtastic.core.model.BootloaderOtaQuirksResponse

T8b949e/**
* Provides the nRF52 bootloader/OTA quirk catalog resolved by the Meshtastic API (`/resource/bootloaderOtaQuirks`) and
* cached locally, seeded from the bundled `device_bootloader_ota_quirks.json` snapshot so it is never empty on a fresh
* install or while offline.
*/
Tff7b72interface T56d364BootloaderOtaQuirksRepository Tb4b4b4{
T8b949e/**
* Best-available snapshot: seeds from the bundled asset if the cache is empty, then returns cached data. Never
* triggers a network call itself — freshness arrives via [reconcile], which [DeviceHardwareRepository] triggers on
* the same cadence as its own catalog refresh. Callers must treat an absent/malformed entry for a given hwModel as
* a deliberate refusal, not a gap to fill with a guess — see `applySoftDeviceVariant` in
* `DeviceHardwareRepositoryImpl`.
*/
Tff7b72suspend Tff7b72fun Td2a8ffgetSnapshotTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3BootloaderOtaQuirksResponse

T8b949e/** Refreshes from the API. An empty response is ignored rather than wiping the existing seed/cache. */
Tff7b72suspend Tff7b72fun Td2a8ffreconcileTb4b4b4(Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.3 - Generated in 0.09s